﻿using System;
using System.Collections.Generic;
using Model.AuthModel;
using Model.Base;
namespace IDAL.AuthModel
{
    /// <summary>
    /// 通用组件，权限模型，接口层，角色
    /// </summary>
    public interface IRoles
    {
        /// <summary>
        /// 新增角色
        /// </summary>
        /// <param name="info">角色对象</param>
        /// <returns></returns>
        int InsertRoles(RolesInfo info, out string message);

        /// <summary>
        /// 更新角色
        /// </summary>
        /// <param name="info">角色对象</param>
        /// <returns></returns>
        bool UpdateRoles(RolesInfo info, out string message);

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="rolesID"></param>
        /// <returns></returns>
        bool DeleteRoles(int rolesID);

        /// <summary>
        /// 根据编号获取角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        RolesInfo GetRolesByID(int id);

        /// <summary>
        /// 角色列表
        /// </summary>
        /// <returns></returns>
        IList<RolesInfo> ListRoles(BaseCondition condition);

        /// <summary>
        /// 角色权限列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        IList<RolesInfo> ListRolesAuth(RolesCondition condition);
    }
}
